package com.mycase.im.boot.entity.database;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.Date;
import java.util.List;

/**
 * @Author ZhuHJay
 * @Date 2021/8/1 0:01
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ImChatGroup {

    /** 讨论组id( UUID ) **/
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /** 讨论组名称 **/
    private String name;

    /** 头像 **/
    private String avatar;

    /** 创建者 **/
    private String createUser;

    /** 创建时间 **/
    private Date createTime;

    /** 该群的群成员 **/
    @TableField(exist = false)
    private List<ImChatGroupUser> groupUsers;

    /** 该群的聊天记录 **/
    @TableField(exist = false)
    private List<ImMessage> chatRecord;

    /** 群未读消息 **/
    @TableField(exist = false)
    private Integer unReadCount;

}
